package control;

import flex.messaging.FlexContext;
import flex.messaging.FlexSession;
import javax.servlet.http.*;


public class SessionCorrente {
	HttpServletRequest request;
	public FlexSession session;
 
	public SessionCorrente() {
		request = FlexContext.getHttpRequest(); 
		session = FlexContext.getFlexSession(); 
	}
 
	public String getSessionId() throws Exception {
		String s = new String();
		s = (String) session.getId();
		return s;
	}
 
	public String getHeader(String h) throws Exception {
		String s = new String();
		s = (String) request.getHeader(h);
		return h + "=" + s;
	}
}